package eit.service.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import eit.model.Issue;

public class IssueRowMapper implements RowMapper
{
	@Override
	public Object mapRow(ResultSet IssueResultSet, int RowNum) throws SQLException 
	{
		//Map the correct value
		Issue NewIssue = new Issue() ;
		
			NewIssue.setID(IssueResultSet.getInt("ID"));
			NewIssue.setTitle(IssueResultSet.getString("Title"));
			NewIssue.setDescription(IssueResultSet.getString("Description"));
			NewIssue.setCategoryID(IssueResultSet.getInt("CategoryID")) ;
			NewIssue.setTypeID(IssueResultSet.getInt("Type"));
					
		return NewIssue;
	}
}
